<?php

session_start();
$username_check=$_SESSION["username"];

include "shared/conn.php";
mysqli_select_db( $conn,"personalterm");
mysqli_query($conn, "set names 'utf-8");

$sql_verify_user="SELECT * FROM `user` WHERE username='{$username_check}'";
$result=mysqli_query($conn,$sql_verify_user);

$user_check_result=mysqli_fetch_array($result, MYSQLI_ASSOC);
$login_session=$user_check_result["username"];

if(!isset($login_session))
{
    header("Location:login.php");
}
